package com.zmn.plat.business.interfaces.base.phenomenon;

import com.zmn.common.dto.VtDTO;
import com.zmn.common.dto2.ResponseDTO;
import com.zmn.plat.model.entity.base.phenomenon.*;
import com.zmn.plat.model.vo.base.phenomenon.PhenomenonVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 描述: 故障现象业务接口类
 *
 * @author chengguang
 * @since 2021/11/19 9:56
 */
public interface PhenomenonBService {

    /**
     * 描述: 根据服务分类和后台产品二级分类查询关联有效故障现象
     *
     * @param servCategId 服务分类id
     * @param categTwoId  后台二级产品分类id
     * @return List<Phenomenon>
     * @author fengxuecai
     * @since 2021/11/25 18:40
     */
    List<Phenomenon> listEfficientPhenomenonByServCategIdAndCategTwoId(Integer servCategId, Integer categTwoId);

    /**
     * 描述: 根据具体故障查询有效故障现象
     *
     * @param faultIds 具体故障id集合
     * @return ResponseDTO<Phenomenon> 故障现象
     * @author fengxuecai
     * @since 2021/11/24 14:20
     */
    List<Phenomenon> listEfficientPhenomenonByFaultIds(List<Integer> faultIds);

    /**
     * 描述: 根据故障现象查询故障现象详情
     *
     * @param phenIds 故障现象id集合
     * @return ResponseDTO<List < com.zmn.common.dto.VtDTO>> 故障现象VtDTO
     * @author fengxuecai
     * @since 2021/11/26 10:40
     */
    List<VtDTO> listPhenomenonByPhenIds(List<Integer> phenIds);

    /**
     * 描述: 分页查询故障现象以及关联故障和检修项目
     *
     * @param @param query 查询
     * @return @return {@link List<PhenomenonVO> }
     * @author chengguang
     * @since 2021/11/19 10:12
     */
    List<PhenomenonVO> listPagePhenomenonByQuery(PhenomenonQuery query);

    /**
     * 描述: 查询故障管理与故障现象关联
     *
     * @param @param phenManageQuery 故障管理查询
     * @return @return {@link List<PhenomenonFault> }
     * @author chengguang
     * @since 2021/11/23 11:26
     */
    List<PhenomenonFault> listPhenomenonFault(PhenomenonFaultQuery phenManageQuery);


    /**
     * 描述: 关联故障
     *
     * @param @param PhenomenonFault
     * @return @return {@link Integer }
     * @author chengguang
     * @since 2021/11/19 11:04
     */
    void addRelateFault(List<PhenomenonFault> PhenomenonFaults);

    /**
     * 描述: 关联检修项目
     *
     * @param @param PhenomenonMaintain
     * @return @return {@link Integer }
     * @author chengguang
     * @since 2021/11/19 11:10
     */
    void addPhenomenonMaintain(List<PhenomenonMaintain> PhenomenonMaintains);

    /**
     * 导入
     *
     * @param file
     * @param operatorId
     * @param operator
     * @param ip
     * @return
     */
    ResponseDTO importExcel(MultipartFile file, Integer operatorId, String operator, String ip);
}

